package com.yjd.bi.birthday.service;

import com.yjd.bi.birthday.model.BirthdayModelDto;
import com.yjd.comm.base.service.IBaseService;
import com.yjd.bi.birthday.model.BirthdayModel;

import java.util.List;
import java.util.Map;
/**
 * <b>description</b>：微信分享红包业务接口<br>
 * <b>time</b>：2016-12-14 10:22:21 <br>
 * <b>author</b>：  ready likun_557@163.com
 */
public interface IBirthdayService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public BirthdayModel insert(BirthdayModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(BirthdayModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(long id) throws Exception;

	/**
	 * 获取统计值
	 * @param name
	 * @param map
     * @return
     */
	public Double getValueBySqlName(String name,Map map);

	/**
	 * 获取统计值
	 * @param name
	 * @param map
	 * @return
	 */
	public List<BirthdayModelDto> getValueBySqlName1(String name, Map map);



	/**
	 * 获取首冲用户数
     */
	public Map getFirstRech(Map map)throws Exception;


}
